package com.sanjiahantang.youjiarole.module.cases.beans;

import com.google.gson.Gson;
import com.sanjiahantang.youjiarole.base.BaseBean;

import java.util.List;

/**
 * Created by zy on 2017/9/4.
 * 案例模型
 */


public class CaseBean extends BaseBean {

    private String data;

    public CaseBean.Data getData() {
        return new Gson().fromJson(data,Data.class);
    }

    public Item getItemData(){
        return new Gson().fromJson(data,Item.class);
    }

    public void setData(String data) {
        this.data = data;
    }

    /**
     * {
     "list": [
     {
     "door": "一室一厅",
     "isRecommend": 0,
     "address": "北京 北京市 东城区",
     "residentialName": "案例视频",
     "acreage": 100,
     "style": "现代简约",
     "state": 0,
     "id": 71,
     "userName": "李四",
     "collectNumber": 0
     },
     {
     "door": "一室一厅",
     "isRecommend": 1,
     "address": "北京 北京市 东城区",
     "residentialName": "案例测试",
     "acreage": 100,
     "style": "欧式古典",
     "state": 0,
     "id": 68,
     "userName": "张三",
     "collectNumber": 0
     }
     ],
     "page": 0,
     "pageSize": 10,
     "totalCount": 2,
     "totalPage": 1
     }
     */
    public static class Data extends ListBean{

        private List<Item> list;

        public List<Item> getList() {
            return list;
        }

        public void setList(List<Item> list) {
            this.list = list;
        }


    }

    public static class Item{
        private String door;
        private int isRecommend;
        private String address;
        private String residentialName;
        private int acreage;
        private String style;
        private int state;
        private int id;
        private String userName;
        private int collectNumber;
        private String caseImg;
        private String headImg;
        private String url;
        private String caseTitle;

        public String getCaseTitle() {
            return caseTitle;
        }

        public void setCaseTitle(String caseTitle) {
            this.caseTitle = caseTitle;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public String getDoor() {
            return door;
        }

        public void setDoor(String door) {
            this.door = door;
        }

        public int getIsRecommend() {
            return isRecommend;
        }

        public void setIsRecommend(int isRecommend) {
            this.isRecommend = isRecommend;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public String getResidentialName() {
            return residentialName;
        }

        public void setResidentialName(String residentialName) {
            this.residentialName = residentialName;
        }

        public int getAcreage() {
            return acreage;
        }

        public void setAcreage(int acreage) {
            this.acreage = acreage;
        }

        public String getStyle() {
            return style;
        }

        public void setStyle(String style) {
            this.style = style;
        }

        public int getState() {
            return state;
        }

        public void setState(int state) {
            this.state = state;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getUserName() {
            return userName;
        }

        public void setUserName(String userName) {
            this.userName = userName;
        }

        public int getCollectNumber() {
            return collectNumber;
        }

        public void setCollectNumber(int collectNumber) {
            this.collectNumber = collectNumber;
        }

        public String getCaseImg() {
            return caseImg;
        }

        public void setCaseImg(String caseImg) {
            this.caseImg = caseImg;
        }

        public String getHeadImg() {
            return headImg;
        }

        public void setHeadImg(String headImg) {
            this.headImg = headImg;
        }
    }


    public static class DetailBean extends BaseBean{
        public Detail getData() {
            return new Gson().fromJson(data,Detail.class);
        }

        public void setData(String data) {
            this.data = data;
        }

        private String data;


    }

    public static class Detail{
        private int acreage;
        private String address;
        private String casePrice;
        private int collectNumber;
        private String createTime;
        private String createUser;
        private String door;
        private int id;
        private int isRecommend;
        private String phone;
        private String residentialName;
        private String style;
        private String updateTime;
        private String userName;
        private String headImg;
        private int state;
        private String indexVideo;
        private String roamId;

        public String getIndexVideo() {
            return indexVideo;
        }

        public void setIndexVideo(String indexVideo) {
            this.indexVideo = indexVideo;
        }

        public int getState() {
            return state;
        }

        public void setState(int state) {
            this.state = state;
        }

        public String getHeadImg() {
            return headImg;
        }

        public void setHeadImg(String headImg) {
            this.headImg = headImg;
        }

        /**
         * 自定义数据
         */
        private String defaultImageUrl;
        private String videoUrl;

        public String getDefaultImageUrl() {
            return defaultImageUrl;
        }

        public void setDefaultImageUrl(String defaultImageUrl) {
            this.defaultImageUrl = defaultImageUrl;
        }

        public String getVideoUrl() {
            return videoUrl;
        }

        public void setVideoUrl(String videoUrl) {
            this.videoUrl = videoUrl;
        }

        private List<Image> caseImg;

        public int getAcreage() {
            return acreage;
        }

        public void setAcreage(int acreage) {
            this.acreage = acreage;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public String getCasePrice() {
            return casePrice;
        }

        public void setCasePrice(String casePrice) {
            this.casePrice = casePrice;
        }

        public int getCollectNumber() {
            return collectNumber;
        }

        public void setCollectNumber(int collectNumber) {
            this.collectNumber = collectNumber;
        }

        public String getCreateTime() {
            return createTime;
        }

        public void setCreateTime(String createTime) {
            this.createTime = createTime;
        }

        public String getCreateUser() {
            return createUser;
        }

        public void setCreateUser(String createUser) {
            this.createUser = createUser;
        }

        public String getDoor() {
            return door;
        }

        public void setDoor(String door) {
            this.door = door;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getIsRecommend() {
            return isRecommend;
        }

        public void setIsRecommend(int isRecommend) {
            this.isRecommend = isRecommend;
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public String getResidentialName() {
            return residentialName;
        }

        public void setResidentialName(String residentialName) {
            this.residentialName = residentialName;
        }

        public String getStyle() {
            return style;
        }

        public void setStyle(String style) {
            this.style = style;
        }

        public String getUpdateTime() {
            return updateTime;
        }

        public void setUpdateTime(String updateTime) {
            this.updateTime = updateTime;
        }

        public String getUserName() {
            return userName;
        }

        public void setUserName(String userName) {
            this.userName = userName;
        }

        public List<Image> getCaseImg() {
            return caseImg;
        }

        public void setCaseImg(List<Image> caseImg) {
            this.caseImg = caseImg;
        }

        public String getRoamId() {
            return roamId;
        }

        public void setRoamId(String roamId) {
            this.roamId = roamId;
        }
    }

    public static class Image{
        private String groupId;
        private String url;
        private int imageSmall;

        public int getImageSmall() {
            return imageSmall;
        }

        public void setImageSmall(int imageSmall) {
            this.imageSmall = imageSmall;
        }

        public String getGroupId() {
            return groupId;
        }

        public void setGroupId(String groupId) {
            this.groupId = groupId;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }
    }
}
